function showHide(id){
	$('#'+id).toggle('fast');
}

function doubleToggle(id1,id2){
	$('#'+id2).slideToggle(400, function () {
		//$('#'+id1).toggle();
	});
}

function doubleToggle2(index,id1,id2){
	tutup[index] = !tutup[index];
	var tampilnya = true;
	for (var i = 0; i < tutup.length; i++) {
		if (!tutup[i]) {
			tampilnya = false;
			break;
		}
	}
	if (tampilnya) {
		$('#'+id2).slideToggle(400, function () {
			$('#slider1-pa').fadeIn();
		});
	} else {
		$('#slider1-pa').fadeOut(400, function () {
			$('#'+id2).slideToggle();
		});
	}
}


function validateField(fld) {
	var error = "";
 
	if (fld.value.length == 0) {
		fld.style.background = 'Yellow'; 
		error = "1";
	} else {
		fld.style.background = 'White';
	}
	return error;  
}

function submitMsg(){		
	var reason = "";
	theForm = document.getElementById('theForm');
	reason += validateField(theForm.name);
	reason += validateField(theForm.email);
	reason += validateField(theForm.msg);
	if (reason != "") {
		alert("Perhatian, isi yang masih kosong.");
	}else{
		var psn=confirm("Apakah Anda ingin mengirim pesan ?");
		if (psn==true){
		  theForm.submit();
		}
	}
	
}
